-
Notifications
You must be signed in to change notification settings - Fork 220
Comments
Conversation
Финал. Попытка 1
Финал. Попытка 1
Финал. Попытка 1
Финал. Попытка 1
Финал. Попытка 1
Финал. Попытка 1
Финал. Попытка 2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно перенести эту строчку наверх, сразу после while, тогда отсюда и перед while её можно удалить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно просто прописать while(true)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для именования переменных лучше использовать верблюжий регистр, то есть menuList
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Наверное, тут должно быть "Если вы не хотите больше вводить товары, введите Завершить"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот if можно убрать, и переменную enough тоже. Из цикла while может быть выход, только если пользователь введет Завершить, и тогда должен будет выполниться код здесь
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно упростить - rub >= 2 && rub <= 4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Этот и getListPrice методы называются "get", то есть "получить", но ничего не возвращают. Лучше назвать "addProduct" и "addPrice". Ещё можно передавать в параметре этого метода сразу объект класса Product, и из него брать имя и цену
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Классы лучше в отдельный файл располагать, и тогда не надо будет делать их статическими
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно упростить условие - rub == 0 || (rub >= 5 && rub <= 9) || (rubTeen >= 11 && rubTeen <= 14)
Uh oh!
There was an error while loading. Please reload this page.
Спринт 2. Проектная работа 1.
попытка 2